package com.iam.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author liyong
 * @since 2021-05-19
 */
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    // 这个
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    private String place;

    private Integer num;

    private String unit;

    private BigDecimal price;

    private Double discount;

    private LocalDateTime producedDate;

    private LocalDateTime expiredDate;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    public LocalDateTime getProducedDate() {
        return producedDate;
    }

    public void setProducedDate(LocalDateTime producedDate) {
        this.producedDate = producedDate;
    }

    public LocalDateTime getExpiredDate() {
        return expiredDate;
    }

    public void setExpiredDate(LocalDateTime expiredDate) {
        this.expiredDate = expiredDate;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", name=" + name +
                ", place=" + place +
                ", num=" + num +
                ", unit=" + unit +
                ", price=" + price +
                ", discount=" + discount +
                ", producedDate=" + producedDate +
                ", expiredDate=" + expiredDate +
                "}";
    }
}
